package com.qf.gitadmin.employee.controller;

import com.qf.common.R;
import com.qf.entity.Employee;
import com.qf.gitadmin.employee.service.EmployeeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * ---厚德载物---
 *
 * @Author lijiaqi
 * @Date 2024/10/8
 * @Desc -- 键盘敲烂 月薪过万 --
 */
@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @Resource
    private EmployeeService employeeService;
    @GetMapping("/select")
    public Employee select(Integer id){
        Employee employee = employeeService.selectById(id);
        return employee;
    }
    @PostMapping("/insert")
    public void insert(Employee employee){
        employeeService.insert(employee);
    }
}
